﻿
'Imports TheBeerHouse.BLL
Imports System.Web.UI.WebControls
Imports System.IO
Imports System.Data
Imports ADOEntity


Namespace Web.UI

    Public Class AdminPage
        Inherits BasePage

       
        Private Sub LoadMenuRight(ByVal strUserID As String)
            'Dim ds As New DataSet
            'Dim dt As New DataTable
            'Dim asdasd As clsLINQToDataTable = New clsLINQToDataTable
            'Dim UserEntities As New userEntities

            'Dim qryUserRight = (From mProgram In UserEntities.SPROGRAM Join _
            '                    mMenuRight In UserEntities.SMENURIGHT On mProgram.PROGRAMCODE Equals mMenuRight.PROGRAMCODE Join _
            '                    mUserRight In UserEntities.SMENURIGHT On mMenuRight.USERRIGHT Equals mUserRight.USERRIGHT _
            '                    Where mMenuRight.USERRIGHT = "1" _
            '                    Select mProgram.PROGRAMNAME, mMenuRight.USERRIGHT, mMenuRight.PROGRAMCODE, _
            '                    mMenuRight.MQUERY, mMenuRight.MADD, mMenuRight.MMODIFY, mMenuRight.MDELETE, _
            '                    mMenuRight.MPRINT).ToList
            'dt = asdasd.LINQToDataTable(qryUserRight, "UserRight")
            'ds.Tables.Add(dt)

        End Sub

        Public Sub chkUserRight(ByVal drUserRight() As DataRow, ByRef objButton As Button)
            'Try
            '    If (objButton.ID = "btnQuery") Then
            '        If (drUserRight(0)("mQuery") = 1) Then
            '            objButton.Enabled = True
            '        Else
            '            objButton.Enabled = False
            '        End If
            '    ElseIf (objButton.ID = "btnAdd") Then
            '        If (drUserRight(0)("mAdd") = 1) Then
            '            objButton.Enabled = True
            '        Else
            '            objButton.Enabled = False
            '        End If
            '    ElseIf (objButton.ID = "btnModify") Then
            '        If (drUserRight(0)("mModify") = 1) Then
            '            objButton.Enabled = True
            '        Else
            '            objButton.Enabled = False
            '        End If
            '    ElseIf (objButton.ID = "btnDelete") Then
            '        If (drUserRight(0)("mDelete") = 1) Then
            '            objButton.Enabled = True
            '        Else
            '            objButton.Enabled = False
            '        End If
            '    ElseIf (objButton.ID = "btnPrint") Then
            '        If (drUserRight(0)("mPrint") = 1) Then
            '            objButton.Enabled = True
            '        Else
            '            objButton.Enabled = False
            '        End If
            '    End If
            'Catch ex As Exception
            '    Throw ex
            'End Try
        End Sub
    End Class

End Namespace